<include file="Public:header"/>


        <!--body wrapper start-->
        <div class="wrapper">
			<!--主播列表 start-->
			<div class="row">
                <div class="col-sm-12">
                <section class="panel">
                <header class="panel-heading">
					<php>
					if($_GET['fid']==2){
					</php>
						<span style="color:#999;">{$game.ktime|date='Y-m-d',###}</span>
						<span style="color:#000;">{$game.name}</span>
						<span style="color:#3366CC;">{$team1.name}</span>
						<span style="color:#CC3333;">VS</span>
						<span style="color:#3366CC;">{$team2.name}</span>
					<php>
					}else{
					</php>
						{$game.name}
					<php>
					}
					</php>
                    <!--<span class="tools pull-right">
                        <a href="javascript:;" class="fa fa-chevron-down"></a>
                        <a href="javascript:;" class="fa fa-times"></a>
					</span>-->
                </header>
                <div class="panel-body">
                <div class="adv-table editable-table ">
                <div class="clearfix">
                    <div class="btn-group">
						<a href="#addmyModal" data-toggle="modal" >
							<button class="btn btn-primary ">
								添加 <i class="fa fa-plus"></i>
							</button>
                        </a>

                    </div>
                    <!--<div class="btn-group pull-right">
                        <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">Tools <i class="fa fa-angle-down"></i>
                        </button>
                        <ul class="dropdown-menu pull-right">
                            <li><a href="#">Export to Excel</a></li>
                        </ul>
                    </div>-->
                </div>
                <div class="space15"></div>
                <table class="table table-striped table-hover table-bordered" id="editable-sample">
                <thead>
                <tr>
                    <th>排序</th>
                    <th>ID</th>
					<php>
					if($_GET['fid']==2){
					</php>
						<th>回合</th>
					<php>
					}else{
					</php>

					<php>
					}
					</php>
                    <th>开始时间</th>
                    <th>结束时间</th>
                    <th>竞猜项目</th>
                    <th>竞猜状态</th>
                    <th>竞猜选项A</th>
                    <th>竞猜选项B</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
					<volist name="list" id="l" >
						<tr class="">
							<td>{$l.displayOrder}</td>
							<td>{$l.id}</td>
							<php>
							if($_GET['fid']==2){
							</php>
								<td>{$l.name}</td>
							<php>
							}else{
							</php>
		
							<php>
							}
							</php>
							<td>{$l.starttime|date='Y-m-d H:i',###}</td>
							<td>{$l.endtime|date='Y-m-d H:i',###}</td>
							<td>{$l.cname}</td>
							<td>{$l.cstatename}</td>
							<td>{$l.check1}<br />{$l.cren1}<br />{$l.cjinbi1}</td>
							<td>{$l.check2}<br />{$l.cren2}<br />{$l.cjinbi2}</td>
							<td>
								<!--<a href="#bianjibox{$l.id}">重新结算</a>
								|
								<a href="#bianjibox{$l.id}">流盘</a>
								<br />-->
								<a class="tan_edit" data-toggle="modal" href="#bianjibox{$l.id}">编辑</a>
								|
								<php>
								if($l['state']==1){
								</php>
									<a href="javascript:;" onclick="del_admin({$l.id},'game_ju',this,'id')">删除</a>
								<php>
								}else{
								</php>
									<a href="javascript:;" onclick="hui_admin({$l.id},'game_ju',this,'id')">恢复</a>
									|
									<a href="javascript:;" class="cddel_admin_btn" onclick="cddel_admin({$l.id},'game_ju',this,'id')">彻底删除</a>
								<php>
								}
								</php>
							</td>
						</tr>
						<!--编辑框 start-->
						<div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" id="bianjibox{$l.id}" class="modal fade">
							<div class="modal-dialog">
								<div class="modal-content">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
										<h4 class="modal-title">编辑</h4>
									</div>
		
									<div class="modal-body ">
										<form action="{:U('Games/game_ju_edit')}" method="post">
											<input type="hidden" name="id" value="{$l.id}">
											<input type="hidden" name="fid" value="{$_GET.fid}">
											<input type="hidden" name="gameid" value="{$_GET.gameid}">
											
											<php>
											if($_GET['fid']==2){
											</php>
												<div class="form-group">
													<label>局数</label>
													<input name="name" value="{$l.name}" class="form-control">
												</div>
												<div class="form-group">
													<label>开赛时间</label>
													<input type="text" name="ktime" value="{$l.ktime|date='Y-m-d H:i',###}" readonly class="form_datetime form-control">
												</div>
											<php>
											}else{
											</php>
						
											<php>
											}
											</php>
											
											<div class="form-group">
												<label>竞猜项目</label>
												<input name="cname" value="{$l.cname}" class="form-control">
											</div>
											<div class="form-group">
												<label>竞猜选项A</label>
												<input name="check1" value="{$l.check1}" class="form-control">
											</div>
											<div class="form-group">
												<label>竞猜选项B</label>
												<input name="check2" value="{$l.check2}" class="form-control">
											</div>
											<div class="form-group">
												<label>竞猜状态</label>
												<select name="cstate" class="form-control">
													<volist name="cstate" id="c">
														<option value="{$c.id}"  <php>if($c['id']==$l['cstate']){</php>selected="selected"<php>}</php>>{$c.name}</option>
													</volist>
												</select>
											</div>
											<div class="form-group">
												<label>盘出现时间</label>
												<input type="text" name="starttime" value="{$l.starttime|date='Y-m-d H:i',###}" readonly class="form_datetime form-control">
											</div>
											<div class="form-group">
												<label>盘消失时间</label>
												<input type="text" name="endtime" value="{$l.endtime|date='Y-m-d H:i',###}" readonly class="form_datetime form-control">
											</div>
											<div class="form-group">
												<label>竞猜选项A人数</label>
												<input name="cren1" value="{$l.cren1}" class="form-control">
											</div>
											<div class="form-group">
												<label>竞猜选项A金币</label>
												<input name="cjinbi1" value="{$l.cjinbi1}" class="form-control">
											</div>
											<div class="form-group">
												<label>竞猜选项B人数</label>
												<input name="cren2" value="{$l.cren2}" class="form-control">
											</div>
											<div class="form-group">
												<label>竞猜选项B金币</label>
												<input name="cjinbi2" value="{$l.cjinbi2}" class="form-control">
											</div>
											<div class="form-group">
												<label>排序</label>
												<input name="displayOrder" value="{$l.displayOrder}" class="form-control">
											</div>
											<button type="submit" class="btn btn-primary">保存</button>
										</form>
									</div>
		
								</div>
							</div>
						</div>
						<!--编辑框 end-->
					</volist>

                </tbody>
                </table>
                </div>
                </div>
                </section>
                </div>
			</div>
			<!--主播列表 end-->
		</div>
        <!--body wrapper end-->
		<!--添加框 start-->
		<div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" id="addmyModal" class="modal fade">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
						<h4 class="modal-title">添加</h4>
					</div>
					<div class="modal-body">
						<form action="{:U('Games/game_ju_edit')}" method="post">
							<input type="hidden" name="id" value="">
							<input type="hidden" name="gameid" value="{$_GET.gameid}">
							<input type="hidden" name="fid" value="{$_GET.fid}">
							
							<php>
							if($_GET['fid']==2){
							</php>
								<div class="form-group">
									<label>局数</label>
									<input name="name" value="" class="form-control">
								</div>
								<div class="form-group">
									<label>开赛时间</label>
									<input type="text" name="ktime" value="" readonly class="form_datetime form-control">
								</div>
							<php>
							}else{
							</php>
		
							<php>
							}
							</php>
							
							<div class="form-group">
								<label>竞猜项目</label>
								<input name="cname" value="" class="form-control">
							</div>
							<div class="form-group">
								<label>竞猜选项A</label>
								<input name="check1" value="" class="form-control">
							</div>
							<div class="form-group">
								<label>竞猜选项B</label>
								<input name="check2" value="" class="form-control">
							</div>
							<div class="form-group">
								<label>竞猜状态</label>
								<select name="cstate" class="form-control">
									<volist name="cstate" id="c">
										<option value="{$c.id}" >{$c.name}</option>
									</volist>
								</select>
							</div>
							<div class="form-group">
								<label>盘出现时间</label>
								<input type="text" name="starttime" value="" readonly class="form_datetime form-control">
							</div>
							<div class="form-group">
								<label>盘消失时间</label>
								<input type="text" name="endtime" value="" readonly class="form_datetime form-control">
							</div>
							<div class="form-group">
								<label>竞猜选项A人数</label>
								<input name="cren1" value="" class="form-control">
							</div>
							<div class="form-group">
								<label>竞猜选项A金币</label>
								<input name="cjinbi1" value="" class="form-control">
							</div>
							<div class="form-group">
								<label>竞猜选项B人数</label>
								<input name="cren2" value="" class="form-control">
							</div>
							<div class="form-group">
								<label>竞猜选项B金币</label>
								<input name="cjinbi2" value="" class="form-control">
							</div>
							<div class="form-group">
								<label>排序</label>
								<input name="displayOrder" value="" class="form-control">
							</div>
							<button type="submit" class="btn btn-primary">保存</button>
						</form>
					</div>
				</div>
			</div>
		</div>
		<!--添加框 end-->

    </div>
    <!-- main content end-->
	
<include file="Public:footer"/>

